<template>
  <el-container style='height: auto;'>
    <el-aside class='siderbar' width="auto">
      <el-menu default-active="1-4-1" router class="el-menu-vertical-demo" :collapse="isCollapse">
        <el-menu-item disabled class="sidebar-title">
          <i>
            <img width="40px" height="40px" src="../../assets/logo.png" />
          </i>
          <span slot="title">后台管理系统</span>
        </el-menu-item>
        <el-menu-item class="options" index="/index">
          <i class="el-icon-s-home"></i>
          <span slot="title">主&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;页</span>
        </el-menu-item>
        <el-menu-item class="options" index="/exam">
          <i class="el-icon-s-order"></i>
          <span slot="title">试卷管理</span>
        </el-menu-item>
       <el-menu-item class="options" index="/dataview">
          <i class="el-icon-s-data"></i>
          <span slot="title">数据导出</span>
        </el-menu-item>
        <el-menu-item class="options" index="/studata">
           <i class="el-icon-s-promotion"></i>
           <span slot="title">信息查询</span>
         </el-menu-item>
      </el-menu>
    </el-aside>
    <el-container>
      <el-header class='header'>
        <el-row class="header-span" :gutter="20">
          <el-col class="header-on" :span="8">
            <el-button class="isexpand" type="info" @click='handle()'>
              <i class="el-icon-s-fold"></i>
            </el-button>
          </el-col>
          <el-col class="header-on" :span="8">admin</el-col>
          <el-col class="header-on" :span="8"></el-col>
        </el-row>
      </el-header>
      <el-main class='main' height='7vh'>
        <slot name="main"></slot>
      </el-main>
      <el-footer class='sidebar-footer' height='3vh'>--- git bigdata application studio---</el-footer>
    </el-container>
  </el-container>
</template>
<style>
  .el-menu-vertical-demo:not(.el-menu--collapse) {
    background-color: #575179;
    overflow: auto;
    width: 200px;
    min-height: 100vh;
  }

  .el-menu-vertical-demo {
    background: #575179;
    overflow: auto;
    width: 90px;
    height: 100vh;
    padding-left: 0px;
  }

  .siderbar {
    height: 100%;
  }

  .sidebar-title {
    height: 80px;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: bold;
  }
  .options{
    color: #FFFFFF;
  }
  .options:hover{
    color: #575179;
  }
  .header {
    /* display: flex; */
    border-bottom-style: inset;
  }
  .header-span{
    height: 100%;
  }
  .header-on{
    height: 100%;
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 50px;
  }
  .isexpand {
    text-align: center;
    position: relative;
    float: left;
    top: 25%;
    width: 2.5rem;
    padding: 0px;
    height: 50%;
  }
  .main{
    background-color: #efefef;
    overflow-y: auto;
    /* min-height: 88vh; */
    padding: 0px;
  }
  .sidebar-footer{
    background-color: #ffffff;
    line-height:100%;
  }
  @media screen and (max-width:75rem) {
    .sidebar-footer{
      display: none;
    }
  }
</style>

<script>
  export default {
    data() {
      return {
        isCollapse: false
      };
    },
    methods: {
      handle() {
        this.isCollapse = !this.isCollapse;
      }
    }
  }
</script>
